<!--
 * @Author: zhangpeng
 * @Date: 2024-11-14 14:00:25
 * @FilePath: \scientific_research_manager_web\src\views\project\components\MyProject\MyProjectHeader.vue
 * @LastEditTime: 2024-12-02 09:38:06
 * @Description: 我的项目 - header
-->
<template>
  <div class="title">
    <span>{{props.projectName}}</span>
    <div>
      <slot name="rightBtn">
        <el-button link type="primary" @click="onShowRecord">审核记录</el-button>
      </slot>

    </div>

    <AuditRecordDrawer v-model:visible="auditRecordVisible" v-if="auditRecordVisible" :project-id="props.projectId" />
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  projectName: {
    type: String,
    default: ''
  },
  projectId: {
    type: String,
    default: ''
  }
})
import AuditRecordDrawer from '@/components/AuditRecordDrawer/index.vue'

const auditRecordVisible = ref(false)

  // 关闭弹窗
  // const closeModal = () => {
  //   auditRecordVisible.value = false;
  // }

  const onShowRecord = () => {
    auditRecordVisible.value = true
  }

  defineExpose({
    onShowRecord
  })
  

</script>

<style scoped lang='scss'>
.title {
  --at-apply: text-20px font-bold border-b border-#E5E6EB py-16px px-20px border-b-solid flex justify-between;
}
</style>